﻿using IM.Easy.Entity.Gen;
using IM.Easy.GenServices.Dtos;
using IM.Easy.Infrastructure.Query;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IM.Easy.GenServices.IServices
{
    public interface IGenTableService
    {
        /// <summary>
        /// 获取需要生成的信息
        /// </summary>
        /// <returns></returns>
        GenTableDto GetGenInfo(Guid id);

        /// <summary>
        /// 更新生成信息
        /// </summary>
        bool UpdateGenInfo(GenTable genTable);

        /// <summary>
        /// 生成
        /// </summary>
        /// <param name="genTable"></param>
        /// <returns></returns>
        GenTable InsertGenTable(GenTable genTable);
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <returns></returns>
        PageResponse<GenTableDto> GetList(GenTableQueryDto query);

        /// <summary>
        /// 获取数据库列表
        /// </summary>
        /// <returns></returns>
        PageResponse<DbTableDto> GetDbTableList(DbTableQueryDto query);
        /// <summary>
        /// 获取数据库表信息
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        DbTableDto GetDbTable(string name);

        /// <summary>
        /// 删除
        /// </summary>
        /// <returns></returns>
        bool Delete(Guid id);
    }
}
